package cn.com.bluemoon.daps.standard.vo;

import cn.com.bluemoon.daps.common.domain.BmPageRequestVo;
import cn.com.bluemoon.daps.common.enums.StandardAuditStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

import static org.apache.commons.lang3.builder.ToStringBuilder.reflectionToString;
import static org.apache.commons.lang3.builder.ToStringStyle.MULTI_LINE_STYLE;

/**
 * 用于变更列表和审批列表的数据查询条件
 *
 * @author Jarod.Kong
 * @date 2020/8/6 11:58
 */
@ApiModel(description = "用于变更列表和审批列表的数据查询条件")
@Setter
@Getter
public class StandardListSearchVo<T> extends BmPageRequestVo<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标准类型 0 基础标准 1 指标标准")
    @NotNull(message = "标准类型不可为空(0 基础标准 1 指标标准)")
    private Integer standardType;

    @ApiModelProperty(value = "审批状态")
    private StandardAuditStatus auditStatus;

    @ApiModelProperty(value = "关键字")
    @Size(max = 100, message = "关键字不可大于{max}")
    private String keyword;

    @ApiModelProperty(value = "针对变更列表和审批列表的查询条件 区分, 默认为false（默认取变更列表数据）", example = "false")
    private Boolean auditPageListReq = Boolean.FALSE;

    @ApiModelProperty(value = "获取树形结构的列表数据？", example = "false")
    private Boolean treePage = Boolean.FALSE;

    @ApiModelProperty(value = "增加standardUniqueId来筛选当前的所有版本数据", hidden = true)
    private String standardUniqueId;

    @Override
    public String toString() {
        return reflectionToString(this, MULTI_LINE_STYLE);
    }
}
